package org.bonorsoft.modules.dingding.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.bonorsoft.modules.dingding.entity.SysUserDepart;
import org.bonorsoft.modules.dingding.mapper.SysUserDepartMapper;
import org.bonorsoft.modules.dingding.service.ISysUserDepartService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 用户与部门关联
 * @Author: WilliamYe
 * @Date:   2020-11-13
 * @Version: V1.0
 */
@Service
public class SysUserDepartServiceImpl extends ServiceImpl<SysUserDepartMapper, SysUserDepart> implements ISysUserDepartService {

    /**
     * 根据部门id获取该部门对应信息
     * @param deptId
     * @return
     */
    @Override
    public List<SysUserDepart> getListByDeptId(String deptId) {
        QueryWrapper<SysUserDepart> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("dept_id", deptId);
        return this.list(queryWrapper);
    }
}
